﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<VietThuongLMS.ViewModels.LopHocMini>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

<div class="wrap_headline">
        <div class="headline">
            <h1>
                Điểm danh</h1>
        </div>
    </div>
    <div class="wrap_cont_nav">
        <div class="cont_nav">
            <a href="<%=ResolveUrl("~/")%>">Trang chủ</a>&nbsp;/&nbsp;Điểm danh
        </div>
    </div>
    <div class="container">
        <section id="middle">
			<div class="middle_inner"">
            <% if (Model != null && Model.Count() > 0)
               {
                   foreach (VietThuongLMS.ViewModels.LopHocMini lopHoc in @Model)
                   {
                   %>    
                   <div style="clear:both; height:30px;"></div>
                   <h3><%=@lopHoc.TenLopHoc%></h3>
                <div style="margin: 20px 0;">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>Ngày học</th>
                                    <th>Ca học</th>
                                    <th>Vắng mặt</th>
                                    <th>Lý do</th>
                                </tr>
                            </thead>
                            <tbody>
                            <% 
                       if (@lopHoc.BangDD != null && @lopHoc.BangDD.Count() > 0)
                       {
                           int i = 1;
                           foreach (VietThuongLMS.ViewModels.BangDiemDanhViewModel @diemDanh in @lopHoc.BangDD)
                           {%>
                                <tr>
                                    <td><%=i%></td>
                                    <td><%=@diemDanh.Ngay.ToString("dd/MM/yyyy")%></td>
                                    <td><%=@diemDanh.CaHoc%></td>
                                    <% if (@diemDanh.VangMat == VietThuongLMS.Utils.Constant.DIEMDANH_CHUADIEMDANH)
               { %>
               <td>
                    Chưa Điểm Danh
               </td>
            <% }
                                       else if (@diemDanh.VangMat == VietThuongLMS.Utils.Constant.DIEMDANH_COMAT)
               { %>
               <td>
                    Hiện diện
               </td>
            <% }
                                       else if (@diemDanh.VangMat == VietThuongLMS.Utils.Constant.DIEMDANH_COPHEP)
               { %>
            <td>
                Có Phép
            </td>
            <% }
               else
               { %>
            <td>
                Không Phép
            </td>
            <% } %>
                                    <td><%=@diemDanh.LyDo%></td>
                   
                                </tr>
                                    <% i++;
                           }
                       }
                       else
                       {%>
                       <tr><td colspan="4">Không có dữ liệu</td></tr>
                     <%}
                                  %>
                            </tbody>
                        </table>
                </div>
                <%}
                }
               else
               { %>
               Không tìm thấy thông tin học viên
                  <%} %>
<!-- __________________________________________________ Finish Sidebar -->	
						
			</div>
		</section>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <title><%=Resources.Global.title%> - <%=Resources.Global.diem_danh%></title>
<style type="text/css">
.dl-horizontal dt {
    float: left;
    width: 160px;
    overflow: hidden;
    clear: left;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-horizontal dd {
    margin-left: 180px;
}
</style>
</asp:Content>
